package cn.iocoder.yudao.module.infra.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MessageTypeEnum {

    NOTICE(0, "notice-push", "通知公告"),
    UPLOAD_FILES(1, "upload-files-push", "批量上传文件消息"),
    WRITTEN_EXAM_ANSWER(2, "written-exam-answer-push", "笔试答案消息"),
    REMOTE_SCREENSHOT(3, "remote-screenshot-push", "远程截屏消息"),
    WRITTEN_EXAM_SUMMARY(4, "written-exam-summary-push", "笔试概要消息"),
    WRITTEN_EXAM_FINISH(5, "written-exam-finish-push", "笔试结束消息"),
    MOBILE_PAGE_PREV(6, "mobile-page-prev-push", "手机翻上一页消息"),
    MOBILE_PAGE_NEXT(7, "mobile-page-next-push", "手机翻下一页消息"),
    PARTIAL_SCREENSHOT_ADD_PICTURES(8, "partial-screenshot-add-pictures-push", "局部截长图加图消息"),
    QUESTION_TYPE(9, "question-type-push", "题型消息"),
    SHORT_TOKEN_REFRESH(10, "short-token-refresh-push", "短令牌刷新消息"),
    POINT_SELECTED(11, "point-selected-push", "点选题消息"),

    ;

    private Integer code;
    private String type;
    private String desc;

    public static MessageTypeEnum getByType(String type) {
        for (MessageTypeEnum item : values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return null;
    }

}
